package com.isunland.managesystem.adapter;

import android.support.annotation.NonNull;
import android.view.View;
import android.widget.CheckBox;
import android.widget.TextView;
import butterknife.BindView;
import com.isunland.managesystem.R;
import com.isunland.managesystem.base.BaseButterKnifeAdapter;
import com.isunland.managesystem.base.BaseVolleyActivity;
import java.util.ArrayList;

/**
 * 对象功能:
 * 开发公司: 北京信普达系统工程有限公司
 * 开发人员: HuXiaoDan
 * 创建时间: 2017/7/13 15:50
 */
public class ScoreMsgListAdapter extends BaseButterKnifeAdapter<String> {
  @BindView(R.id.tv_type_name) TextView tvTypeName;
  @BindView(R.id.cb_type_name) CheckBox cbTypeName;

  public ScoreMsgListAdapter(BaseVolleyActivity context, ArrayList<String> objects) {
    super(context, objects);
  }

  @Override protected int setLayoutId() {
    return R.layout.adapter_type_list;
  }

  @NonNull @Override protected BaseViewHolder initHolder(View convertView) {
    return new ViewHolder(convertView);
  }

  @Override protected void initView(String item, BaseViewHolder baseHolder, int position) {
    ViewHolder holder = (ViewHolder) baseHolder;
    holder.tvTypeName.setText(item);
  }

  protected class ViewHolder extends BaseViewHolder {
    @BindView(R.id.tv_type_name) TextView tvTypeName;
    @BindView(R.id.cb_type_name) CheckBox cbTypeName;

    ViewHolder(View view) {
      super(view);
      cbTypeName.setVisibility(View.GONE);
    }
  }
}
